package com.ruoyi.fun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fun.mapper.SysBackendUpdateLogMapper;
import com.ruoyi.fun.domain.SysBackendUpdateLog;
import com.ruoyi.fun.service.ISysBackendUpdateLogService;

/**
 * 后台更新记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class SysBackendUpdateLogServiceImpl implements ISysBackendUpdateLogService 
{
    @Autowired
    private SysBackendUpdateLogMapper sysBackendUpdateLogMapper;

    /**
     * 查询后台更新记录
     * 
     * @param id 后台更新记录主键
     * @return 后台更新记录
     */
    @Override
    public SysBackendUpdateLog selectSysBackendUpdateLogById(Long id)
    {
        return sysBackendUpdateLogMapper.selectSysBackendUpdateLogById(id);
    }

    /**
     * 查询后台更新记录列表
     * 
     * @param sysBackendUpdateLog 后台更新记录
     * @return 后台更新记录
     */
    @Override
    public List<SysBackendUpdateLog> selectSysBackendUpdateLogList(SysBackendUpdateLog sysBackendUpdateLog)
    {
        return sysBackendUpdateLogMapper.selectSysBackendUpdateLogList(sysBackendUpdateLog);
    }

    /**
     * 新增后台更新记录
     * 
     * @param sysBackendUpdateLog 后台更新记录
     * @return 结果
     */
    @Override
    public int insertSysBackendUpdateLog(SysBackendUpdateLog sysBackendUpdateLog)
    {
        sysBackendUpdateLog.setCreateTime(DateUtils.getNowDate());
        return sysBackendUpdateLogMapper.insertSysBackendUpdateLog(sysBackendUpdateLog);
    }

    /**
     * 修改后台更新记录
     * 
     * @param sysBackendUpdateLog 后台更新记录
     * @return 结果
     */
    @Override
    public int updateSysBackendUpdateLog(SysBackendUpdateLog sysBackendUpdateLog)
    {
        sysBackendUpdateLog.setUpdateTime(DateUtils.getNowDate());
        return sysBackendUpdateLogMapper.updateSysBackendUpdateLog(sysBackendUpdateLog);
    }

    /**
     * 批量删除后台更新记录
     * 
     * @param ids 需要删除的后台更新记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBackendUpdateLogByIds(Long[] ids)
    {
        return sysBackendUpdateLogMapper.deleteSysBackendUpdateLogByIds(ids);
    }

    /**
     * 删除后台更新记录信息
     * 
     * @param id 后台更新记录主键
     * @return 结果
     */
    @Override
    public int deleteSysBackendUpdateLogById(Long id)
    {
        return sysBackendUpdateLogMapper.deleteSysBackendUpdateLogById(id);
    }
}
